package beans;

/**
 * TODO：
 *
 * @Author DYH
 * @Version 1.0
 * @Time 2021/03/28 12:07
 **/
public class User {
    private String name;
    private Car car;

    public User() {
    }

    public User(String name, Car car) {
        this.name = name;
        this.car = car;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return car
     */
    public Car getCar() {
        return car;
    }

    /**
     * 设置
     * @param car
     */
    public void setCar(Car car) {
        this.car = car;
    }

    public String toString() {
        return "User{name = " + name + ", car = " + car + "}";
    }
}
